#!/bin/bash
set -eu

TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework-without-repo

setupenvironment

buildpackage 'missing-dependency'
buildpackage 'simple-package'

testpkgnotinstalled 'missing-dependency'
testpkgnotinstalled 'simple-package'
testsuccess aptget check

installpackage 'simple-package'

testpkgnotinstalled 'missing-dependency'
testpkginstalled 'simple-package'
testsuccess aptget check

installpackage 'missing-dependency'

testpkginstalled 'missing-dependency'
testpkginstalled 'simple-package'
testfailure aptget check
